/**
- * SECTION:gtkviewport
- * @Short_description: An adapter which makes widgets scrollable
- * @Title: GtkViewport
- * @See_also:#GtkScrolledWindow, #GtkAdjustment
+ * GtkViewport:
*
- * The #GtkViewport widget acts as an adaptor class, implementing
+ * The `GtkViewport` widget acts as an adaptor class, implementing
* scrollability for child widgets that lack their own scrolling
- * capabilities. Use GtkViewport to scroll child widgets such as
- * #GtkGrid, #GtkBox, and so on.
+ * capabilities.
*
- * The GtkViewport will start scrolling content only if allocated less
- * than the child widget’s minimum size in a given orientation.
+ * Use `GtkViewport` to scroll child widgets such as `GtkGrid`,
+ * `GtkBox`, and so on.
+ *
+ * The `GtkViewport` will start scrolling content only if allocated
+ * less than the child widget’s minimum size in a given orientation.
*
* # CSS nodes
*
- * GtkViewport has a single CSS node with name `viewport`.
+ * `GtkViewport` has a single CSS node with name `viewport`.
*
* # Accessibility
*
- * GtkViewport uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
+ * `GtkViewport` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
*/
typedef struct _GtkViewportPrivate GtkViewportPrivate;
g_object_class_override_property (gobject_class, PROP_HSCROLL_POLICY, "hscroll-policy");
g_object_class_override_property (gobject_class, PROP_VSCROLL_POLICY, "vscroll-policy");
+ /**
+ * GtkViewport:scroll-to-focus: (attributes org.gtk.Property.get=gtk_viewport_get_scroll_to_focus org.gtk.Property.set=gtk_viewport_set_scroll_to_focus)
+ *
+ * Whether to scroll when the focus changes.
+ */
g_object_class_install_property (gobject_class,
PROP_SCROLL_TO_FOCUS,
g_param_spec_boolean ("scroll-to-focus",
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-
+ /**
+ * GtkViewport:child: (attributes org.gtk.Property.get=gtk_viewport_get_child org.gtk.Property.set=gtk_viewport_set_child)
+ *
+ * The child widget.
+ */
g_object_class_install_property (gobject_class,
PROP_CHILD,
g_param_spec_object ("child",
* @hadjustment: (allow-none): horizontal adjustment
* @vadjustment: (allow-none): vertical adjustment
*
- * Creates a new #GtkViewport with the given adjustments, or with default
+ * Creates a new `GtkViewport`.
+ *
+ * The new viewport uses the given adjustments, or default
* adjustments if none are given.
*
- * Returns: a new #GtkViewport
+ * Returns: a new `GtkViewport`
*/
GtkWidget*
gtk_viewport_new (GtkAdjustment *hadjustment,
}
/**
- * gtk_viewport_get_scroll_to_focus:
- * @viewport: a #GtkViewport
+ * gtk_viewport_get_scroll_to_focus: (attributes org.gtk.Method.get_property=scroll-to-focus)
+ * @viewport: a `GtkViewport`
*
* Gets whether the viewport is scrolling to keep the focused
- * child in view. See gtk_viewport_set_scroll_to_focus().
+ * child in view.
*
* Returns: %TRUE if the viewport keeps the focus child scrolled to view
*/
}
/**
- * gtk_viewport_set_scroll_to_focus:
- * @viewport: a #GtkViewport
+ * gtk_viewport_set_scroll_to_focus: (attributes org.gtk.Method.set_property=scroll-to-focus)
+ * @viewport: a `GtkViewport`
* @scroll_to_focus: whether to keep the focus widget scrolled to view
*
* Sets whether the viewport should automatically scroll
}
/**
- * gtk_viewport_set_child:
- * @viewport: a #GtkViewport
+ * gtk_viewport_set_child: (attributes org.gtk.Method.set_property=child)
+ * @viewport: a `GtkViewport`
* @child: (allow-none): the child widget
*
* Sets the child widget of @viewport.
}
/**
- * gtk_viewport_get_child:
- * @viewport: a #GtkViewport
+ * gtk_viewport_get_child: (attributes org.gtk.Method.get_property=child)
+ * @viewport: a `GtkViewport`
*
* Gets the child widget of @viewport.
*